{include file="general/header.tpl"}
<div id="path">
	You are here: <a href="index.php">Home</a>
</div>
<div id="main">
	{if $smarty.get.error}
		<div class="failed">
			Sorry. Either the URL or the URL set you are trying to reach does not exist, is disabled or has expired.
		</div><br />
	{/if}
	{if $paginate.total > 0 && $paginate.current_item <= $paginate.total}
		<div class="center">
			{include file="general/pagination_item_range.tpl"}
		</div>
		<br />
	{/if}
	{foreach $news_items as $news_item}
		<h1>{$news_item.title}</h1>
		<div class="float-left"><i>posted {if $news_item.username}by {$news_item.username} {/if}on {$news_item.date}</i></div>
		<div class="float-right"><a href="news_comment_add.php?id={$news_item.id}">{$news_item.nb_comments} comment{if $news_item.nb_comments > 1}s{/if}</a></div>
		<div class="clear"></div>
		<p>{$news_item.content|nl2br}</p>
	{foreachelse}
		<p class="center">No news matches found in the database.</p>
	{/foreach}
	{if $news_item@show}
		<br />
		<div class="center">
			{include file="general/pagination_page_number.tpl"}
		</div>
	{/if}
</div>
{include file="general/left.tpl"}
{include file="general/footer.tpl"}